<template>
	<view class="box" :style="{'padding-top':systemHeight+28.5+'px'}">
		<view class="head">
			<image class="back" src="/static/img/back.png" @click="back"></image>
			<view class="title">Privacy</view>
			<view class="right"></view>
		</view>
		<view class="row">
			<view class="row_top">
				<view>Location Sharing</view>
				<image class="button" src="/static/img/switch_open.png" @click="openStatus=false"
					v-if="openStatus==true"></image>
				<image class="button" src="/static/img/switch_close.png" @click="openStatus=true" v-else></image>
			</view>
			<view class="text">Location sharing helps drivers provide you with better services
				If location sharing is disabled, drivers won't be able to see your
				real-time location.</view>
		</view>
		<view class="row">
			<view class="row_top">
				<view>System Permissions</view>
				<image class="next" s src="/static/img/right.png"></image>
			</view>
			<view class="text">To ensure the best user experience possible, you may need to
				enable certain permissions on your phone.</view>
		</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				systemHeight: null,
				openStatus: false
			}
		},
		created() {
			this.systemHeight = uni.getSystemInfoSync().statusBarHeight
		},
		methods: {
			back() {
				uni.navigateBack()
			}
		}
	}
</script>

<style>
	.box {
		position: fixed;
		width: 100%;
		height: 100vh;
	}

	.head {
		margin: 0rpx auto 57rpx;
		width: 92%;
		display: flex;
		justify-content: space-between;
		align-items: center;
	}

	.back {
		width: 20rpx;
		height: 36rpx;
	}

	.title {
		font-family: Mont;
		font-weight: bold;
		font-size: 32rpx;
	}

	.right {
		width: 20rpx;
	}

	.row {
		position: relative;
		width: 92%;
		margin: 0rpx auto;
		font-family: Mont;
		font-weight: 500;
		font-size: 28rpx;
		margin-bottom: 39rpx;
		border-bottom: 1rpx solid #F4F4F4;
		padding-bottom: 34rpx;
	}

	.text {
		margin-top: 24rpx;
		width: 634rpx;
		font-family: Mont;
		font-weight: 300;
		font-size: 20rpx;
		color: #6F6F6F;
		line-height: 24rpx;
		white-space: pre-wrap;
		word-wrap: break-word;
	}

	.button {
		position: absolute;
		top: 0;
		right: 0;
		width: 70rpx;
		height: 36rpx;
	}

	.next {
		position: absolute;
		top: 20rpx;
		right: 0;
		width: 11rpx;
		height: 20rpx;
	}
</style>